package com.resign.carl.observer;

import com.resign.carl.observer.api.impl.AngleObserver;
import com.resign.carl.observer.api.impl.DemonObserver;

import java.util.Observable;

/**
 * 观察者模式
 * Created by carl.zhao on 2016/6/13.
 */
public class AnswerStation extends Observable {
    public static void main(String[] args) {
        AnswerStation observable = new AnswerStation();
        observable.setChanged();
        observable.addObserver(new AngleObserver());
        observable.addObserver(new DemonObserver());
        observable.notifyObservers();
        observable.clearChanged();
    }
}
